<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
       xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
    rdf:about=""
    trackback:ping="<%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article %>"
    dc:title="<%=h @article.title.gsub(/-+/, '-') %>"
    dc:identifier="<%= server_url_for :controller=>"articles", :action=>"read", :id=>@article %>"
    dc:description="<%=h strip_html(@article.body_html[0..255]).gsub(/-+/, '-') %>"
    dc:creator="<%= h @article.author %>"
    dc:date="<%= @article.updated_at.xmlschema %>" />
</rdf:RDF>
-->

<div class="post"<%= onhover_show_admin_tools(:article) %>>
  <%= link_to("edit", { :controller => "admin/content", :action => "edit", :id => @article },
        :class => "admintools", :style => "display: none", :id => "admin_article") %>
  <h2><%= @article.title %></h2>
  <p class="auth">Posted by <%= author_link(@article) %>
  <%= js_distance_of_time_in_words_to_now @article.created_at.utc %></p>
  <%= @article.full_html %>
</div>

<% if @article.allow_comments? or @article.comments.size > 0 -%>
  <a name="comments"></a><h4 class="blueblk">Comments</h4> 
<% if @article.allow_comments? -%>
  <p class="postmetadata alt">
    <small><a href="#respond">Leave a response</a></small>
  </p>
<% end -%>
  <%= content_tag(:ol, render(:partial => "comment", :collection => @article.comments), :id => 'commentList', :class => 'comment-list') %>
<% end -%>

<% if @article.allow_pings? -%>
  <a name="trackbacks"></a><h4 class="blueblk">Trackbacks</h4>
  <p>
    Use the following link to trackback from your own site:<br/>
    <span class="light-bg"><%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article.id %></span>
    </p>    
  <%= content_tag(:ol, render(:partial => "trackback", :collection => @article.trackbacks), :id => 'trackbackList', :class => 'trackback-list') %>  
<% end -%>

<p class="postmetadata alt">
  <small>
  <a href="<%= xml_url(:action=>'articlerss', :id=>@article) %>" title="RSS Feed">RSS feed for this post</a>
  <a href="<%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article.id %>">trackback uri</a>  
  </small>
</p>

<% if @article.allow_comments? -%>
  <%= render :partial => 'comment_box' %>
<% else -%>
  <p>Comments are disabled</p>
<% end -%>
